package com.simple.javatraining.testing.testinside.questions;

import com.simple.javatraining.testing.io.InputOutput;
import com.simple.javatraining.testing.testinside.answers.Answer;
import com.simple.javatraining.testing.testinside.answers.ProposedAnswer;

import java.util.List;

public class QuestionWithEnterableAnswer extends Question{

    public QuestionWithEnterableAnswer(String question, List<ProposedAnswer> answers) {
        super(question, answers);
    }

    public double checkUserAnswerForCorrect(Answer userAnswer) {
        double correspondenceTruth = 0d;
        ProposedAnswer correctAnswer = this.getVariantsOfAnswer().get(0);
        if(userAnswer.equals(correctAnswer)) {
            correspondenceTruth = 1d;
        }
        return correspondenceTruth;
    }

    public void proposeVariantsOfAnswer() {}

    public void printHint() {
        InputOutput.outputMessageToConsole("Введите ответ:");
    }
}
